import { defineStore } from 'pinia'

export const useTabStore = defineStore('tab', {
  state: () => {
    return {
      tabList: [],
      hostList: ['192.168.1.23', '192.168.1.24'],
      currentTab: '',
      closeId: '',
      resize: ''
    }
  },
  actions: {
    addTab(data) {
      this.tabList.push(data)
    }
  }
})

export const useHostStore = defineStore('host', {
  state: () => {
    return {
      hostList: []
    }
  },
  persist: {
    storage: localStorage
  }
})
